package com.ocean.workOrder.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ocean.workOrder.mapper.OWorkOrderItemMapper;
import com.ocean.workOrder.domain.OWorkOrderItem;
import com.ocean.workOrder.service.IOWorkOrderItemService;
import com.ocean.common.core.text.Convert;

/**
 * 任务单管理Service业务层处理
 *
 * @author ocean
 * @date 2023-02-14
 */
@Service
public class OWorkOrderItemServiceImpl implements IOWorkOrderItemService
{
    @Autowired
    private OWorkOrderItemMapper oWorkOrderItemMapper;

    /**
     * 查询任务单管理
     *
     * @param ID 任务单管理主键
     * @return 任务单管理
     */
    @Override
    public OWorkOrderItem selectOWorkOrderItemByID(String ID)
    {
        return oWorkOrderItemMapper.selectOWorkOrderItemByID(ID);
    }

    /**
     * 查询任务单管理列表
     *
     * @param oWorkOrderItem 任务单管理
     * @return 任务单管理
     */
    @Override
    public List<OWorkOrderItem> selectOWorkOrderItemList(OWorkOrderItem oWorkOrderItem)
    {
        return oWorkOrderItemMapper.selectOWorkOrderItemList(oWorkOrderItem);
    }

    /**
     * 新增任务单管理
     *
     * @param oWorkOrderItem 任务单管理
     * @return 结果
     */
    @Override
    public int insertOWorkOrderItem(OWorkOrderItem oWorkOrderItem)
    {
        return oWorkOrderItemMapper.insertOWorkOrderItem(oWorkOrderItem);
    }

    /**
     * 修改任务单管理
     *
     * @param oWorkOrderItem 任务单管理
     * @return 结果
     */
    @Override
    public int updateOWorkOrderItem(OWorkOrderItem oWorkOrderItem)
    {
        return oWorkOrderItemMapper.updateOWorkOrderItem(oWorkOrderItem);
    }

    /**
     * 批量删除任务单管理
     *
     * @param IDs 需要删除的任务单管理主键
     * @return 结果
     */
    @Override
    public int deleteOWorkOrderItemByIDs(String IDs)
    {
        return oWorkOrderItemMapper.deleteOWorkOrderItemByIDs(Convert.toStrArray(IDs));
    }

    /**
     * 删除任务单管理信息
     *
     * @param ID 任务单管理主键
     * @return 结果
     */
    @Override
    public int deleteOWorkOrderItemByID(String ID)
    {
        return oWorkOrderItemMapper.deleteOWorkOrderItemByID(ID);
    }
}
